package com.nbufe.observer.demo1;

/**
 * @Author Zan
 * @Create 2024/5/27 8:36
 * @ClassName: Client
 * @Description : TODO 请用一句话描述该类的功能
 */
public class Client {
    public static void main(String[] args) {
        ConcreteTeamFormationAlliance alliance = new ConcreteTeamFormationAlliance("大红鹰战队");

        Player player1 = new Player("张三");
        Player player2 = new Player("李四");
        Player player3 = new Player("王五");

        alliance.addObserver(player1);
        alliance.addObserver(player2);
        alliance.addObserver(player3);

        player1.beAttacked(alliance); // 求救

    }
}
